<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta charset='utf-8' />
	<title>国网云盘系统</title>
	<style>
		.cursers{cursor:pointer}
	</style>
</head>
<body style='background:#ddd;padding:0px;margin:0px;padding-left:10px'>
	<h1 style='text-align:center'>修改密码</h1>

	<div style='width:230px;border:0px solid;margin:0 auto'>
		<div style='margin:15px 0'>原密码：<input type="password" id='p1' /></div>
		<div style='margin:15px 0'>新密码：<input type="password" id='p2'  /></div>
		<div style='margin:15px 0'>新密码：<input type="password" id='p3'  /></div>
		<div style='position:relative'>
			验证码：<input type="text" style='width:50px' id='code' />
			<span style='position:absolute;left:130px;border:0px solid;width:90px;height:30px'><img src="../interface/before_interface.php?type=code" style='width:100%;height:100%' alt="" onclick="this.src=this.src+'&t='+Math.random()" /></span>
		</div>

		<div style='margin:25px 0;text-align:center'>
			<button id='changeBtn'>修改</button>
			<button onclick='history.go(-1)'>返回</button>
		</div>
	</div>
</body>
</html>
<script src='../public/jquery1.1.js'></script>
<script src='../public/fun.js'></script>
<script>
_checkExit(1);	//检测账号异常强制退出
$(function(){
	$('#changeBtn').click(function(){
		var p1 = m_trim($('#p1').val());
		var p2 = m_trim($('#p2').val());
		var p3 = m_trim($('#p3').val());
		var code = m_trim($('#code').val());
		if(!p1 || !p2 || !p3 || !code){
			return;
		}
		if(p2 != p3){
			A('两次新密码不一致！');
			return;
		}
		var data = {
			type:'changePwd',
			p1:p1,
			p2:p2,
			vcode:code
		}
		AjaxAfter(data,function(res){
			var tmp = _checkJsonFormat(res,1);
			switch(tmp.stat){
				case 'ok':A('密码修改成功！');history.go(-1);break;
				case 'err2':A('数据异常！');break;
				case 'err3':A('原密码不正确！');break;
			}
		});
	});

});	
</script>

